<?php
    //建立数据库连接
    include("../inc/dbconn.php");

    $Id = $_POST["Id"];
    $truename = $_POST["truename"];
    $tel = $_POST["tel"];
    $rest = $_POST["rest"];

    $sql = "update division set truename='$truename',tel='$tel',rest='$rest' where Id=$Id";

    if ($conn->query($sql) ===true ){
        $data["code"] = 3000;
        $data["msg"] = "修改成功";
    }
    echo json_encode($data)
?>